﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<sg.edu.nus.iss.prettyfaces.DataAccessLayer.Relationship>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	getRequestById
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%  %>

    <h2>Request By Photographers</h2>

    <table>
        <tr>
            <th></th>
            <th></th>
            <th>
                Photographer Id
            </th>
            <th>
                Status
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Approve", "SaveApprove", new { id = item.PhotographerID })%> 
            </td>
            <td>
                <%= Html.ActionLink("Reject", "SaveReject", new { id = item.PhotographerID })%>
            </td>
            <td>
                <%= Html.Encode(item.PhotographerID) %>
            </td>
            <td>
                <%if (item.Status == 1)
                  { %>
                <%= Html.Encode("pending")%>
                <%}
                  else if(item.Status == 2) 
                  {%>
                <%= Html.Encode("Reject")%>
                <%}
                  else if (item.Status == 3)
                  {%>
                <%= Html.Encode("Approve")%>
                <%} %>
            </td>
        </tr>
    
    <% } %>
    </table>
    <p>
        <%=Html.ActionLink("Back to Account", "Details")%>
    </p>

</asp:Content>
